package com.eas.biz.dao.user.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.eas.biz.dao.user.dataobject.UserDO;
import com.eas.biz.dao.user.interfaces.UserDao;
import com.eas.biz.framework.BaseQuery;
import com.eas.biz.framework.dao.GenericDaoImpl;

@Repository("userDao")
public class UserDaoImpl extends GenericDaoImpl<UserDO> implements UserDao {

    public UserDO selectById(long id) {
        return selectById("User.selectById", id);
    }

    public long insert(UserDO user) {
        return insert("User.insert", user);
    }

    public int deleteById(long id) {
        return deleteById("User.deleteById", id);
    }

    public int update(UserDO user) {
        return update("User.update", user);
    }

    public List<UserDO> selectByQuery(BaseQuery query) {
        return selectByQuery("User.selectByQuery", query);
    }

    public int countByQuery(BaseQuery query) {
        return countByQuery("User.countByQuery", query);
    }
}
